/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainGUI.java
 *
 * Created on 28.Nis.2010, 20:58:59
 */
package edu.iyte.ceng.codegen;

import java.awt.Desktop;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

import javax.swing.JFileChooser;
import javax.swing.filechooser.FileNameExtensionFilter;

import edu.iyte.ceng.codegen.keywords.InvalidConstraintException;

/**
 * 
 * @author CUNEYT
 */
public class MainGUI extends javax.swing.JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static String DEFAULT_MESSAGE = "Please Choose a File";
	private static String MODEL_ERROR = "Model File";
	private static String CONSTRAINT_ERROR = "Constraint File";
	/*The default ouput file path*/
	private static String DEFAULT_OUTPUT_PATH = System.getProperty("user.home")
			+ File.separatorChar + "output.txt";
	/*The UML model file*/
	private static File modelFile;
	/*The OCL constraint file*/
	private static File constraintFile;
	/*The output file*/
	private static File outputFile;

	/**
	 * @return the DEFAULT_MESSAGE
	 */
	public static String getDEFAULT_MESSAGE() {
		return DEFAULT_MESSAGE;
	}

	/**
	 * @param aDEFAULT_MESSAGE
	 *            the DEFAULT_MESSAGE to set
	 */
	public static void setDEFAULT_MESSAGE(String aDEFAULT_MESSAGE) {
		DEFAULT_MESSAGE = aDEFAULT_MESSAGE;
	}

	/**
	 * @return the MODEL_ERROR
	 */
	public static String getMODEL_ERROR() {
		return MODEL_ERROR;
	}

	/**
	 * @param aMODEL_ERROR
	 *            the MODEL_ERROR to set
	 */
	public static void setMODEL_ERROR(String aMODEL_ERROR) {
		MODEL_ERROR = aMODEL_ERROR;
	}

	/**
	 * @return the CONSTRAINT_ERROR
	 */
	public static String getCONSTRAINT_ERROR() {
		return CONSTRAINT_ERROR;
	}

	/**
	 * @param aCONSTRAINT_ERROR
	 *            the CONSTRAINT_ERROR to set
	 */
	public static void setCONSTRAINT_ERROR(String aCONSTRAINT_ERROR) {
		CONSTRAINT_ERROR = aCONSTRAINT_ERROR;
	}

	/*Model file path*/
	private String modelPath = null;
	/*Constraint file path*/
	private String constraintPath = null;
	/*Output file path*/
	private String outputPath = DEFAULT_OUTPUT_PATH;

	/** Creates new form MainGUI */
	public MainGUI() {
		initComponents();
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	private void initComponents() {

		modelLabel = new javax.swing.JLabel();
		browseModelButton = new javax.swing.JButton();
		modelPathLabel = new javax.swing.JLabel();
		constraintLabel = new javax.swing.JLabel();
		browseConstraintButton = new javax.swing.JButton();
		constraintPathLabel = new javax.swing.JLabel();
		jLabel2 = new javax.swing.JLabel();
		modelFilePathTextField = new javax.swing.JTextField();
		constraintFilePathTextField = new javax.swing.JTextField();
		browseOutputButton = new javax.swing.JButton();
		outputPathLabel = new javax.swing.JLabel();
		outputFilePathTextField = new javax.swing.JTextField();
		generateButton = new javax.swing.JButton();
		resetButton = new javax.swing.JButton();
		messageLabel = new javax.swing.JLabel();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("BDD Builder");

		modelLabel.setText("CHOOSE MODEL FILE");

		browseModelButton.setText("BROWSE");
		browseModelButton
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						browseModelButtonActionPerformed(evt);
					}
				});

		modelPathLabel
				.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		modelPathLabel.setText("PATH :");

		constraintLabel.setText("CHOOSE CONSTRAINT FILE");

		browseConstraintButton.setText("BROWSE");
		browseConstraintButton
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						browseConstraintButtonActionPerformed(evt);
					}
				});

		constraintPathLabel
				.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		constraintPathLabel.setText("PATH :");

		jLabel2.setText("CHOOSE  OUTPUT FILE");

		modelFilePathTextField.setEditable(false);
		modelFilePathTextField.setForeground(new java.awt.Color(255, 0, 0));
		modelFilePathTextField.setText("Please Choose a File");

		constraintFilePathTextField.setEditable(false);
		constraintFilePathTextField
				.setForeground(new java.awt.Color(255, 0, 0));
		constraintFilePathTextField.setText("Please Choose a File");

		browseOutputButton.setText("BROWSE");
		browseOutputButton
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						browseOutputButtonActionPerformed(evt);
					}
				});

		outputPathLabel.setText("PATH :");

		outputFilePathTextField.setEditable(false);
		outputFilePathTextField.setText(getOutputPath());

		generateButton.setText("GENERATE");
		generateButton.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				generateButtonActionPerformed(evt);
			}
		});

		resetButton.setText("RESET");
		resetButton.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				resetButtonActionPerformed(evt);
			}
		});

		messageLabel.setForeground(new java.awt.Color(255, 0, 0));

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout
				.setHorizontalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								layout
										.createSequentialGroup()
										.addContainerGap()
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.LEADING)
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				modelLabel)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																				235,
																				Short.MAX_VALUE)
																		.addComponent(
																				browseModelButton))
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				constraintLabel)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																				204,
																				Short.MAX_VALUE)
																		.addComponent(
																				browseConstraintButton))
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				jLabel2)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																				226,
																				Short.MAX_VALUE)
																		.addComponent(
																				browseOutputButton))
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				modelPathLabel)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED)
																		.addComponent(
																				modelFilePathTextField,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				376,
																				Short.MAX_VALUE))
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				constraintPathLabel)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED)
																		.addComponent(
																				constraintFilePathTextField,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				376,
																				Short.MAX_VALUE))
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				outputPathLabel)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED)
																		.addComponent(
																				outputFilePathTextField,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				376,
																				Short.MAX_VALUE))
														.addGroup(
																javax.swing.GroupLayout.Alignment.TRAILING,
																layout
																		.createSequentialGroup()
																		.addComponent(
																				messageLabel,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				237,
																				Short.MAX_VALUE)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
																		.addComponent(
																				generateButton)
																		.addGap(
																				18,
																				18,
																				18)
																		.addComponent(
																				resetButton)))
										.addContainerGap()));
		layout
				.setVerticalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								layout
										.createSequentialGroup()
										.addContainerGap()
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(
																modelLabel)
														.addComponent(
																browseModelButton))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(
																modelPathLabel,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																17,
																javax.swing.GroupLayout.PREFERRED_SIZE)
														.addComponent(
																modelFilePathTextField,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE))
										.addGap(18, 18, 18)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(
																constraintLabel)
														.addComponent(
																browseConstraintButton))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(
																constraintPathLabel)
														.addComponent(
																constraintFilePathTextField,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(jLabel2)
														.addComponent(
																browseOutputButton))
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(
																outputPathLabel)
														.addComponent(
																outputFilePathTextField,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE))
										.addGap(18, 18, 18)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.BASELINE)
														.addComponent(
																resetButton)
														.addComponent(
																generateButton)
														.addComponent(
																messageLabel,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																23,
																javax.swing.GroupLayout.PREFERRED_SIZE))
										.addContainerGap(
												javax.swing.GroupLayout.DEFAULT_SIZE,
												Short.MAX_VALUE)));

		pack();
	}// </editor-fold>//GEN-END:initComponents
	/*
	 * Reset the field messages and variables
	 * */
	private void resetButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_resetButtonActionPerformed

		getModelFilePathTextField()
				.setForeground(new java.awt.Color(255, 0, 0));
		getModelFilePathTextField().setText(getDEFAULT_MESSAGE());
		getConstraintFilePathTextField().setForeground(
				new java.awt.Color(255, 0, 0));
		getConstraintFilePathTextField().setText(getDEFAULT_MESSAGE());
		setOutputPath(getOutputPath());
		getOutputFilePathTextField().setText(getOutputPath());
		getMessageLabel().setText(null);
		setModelPath(null);
		setConstraintPath(null);
	}// GEN-LAST:event_resetButtonActionPerformed

	
	/*
	 * Open a open-file dialog to choose the UML model file 
	 * */
	private void browseModelButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_browseModelButtonActionPerformed

		//Create a file chooser with the current user directory as the default location
		JFileChooser fc = new JFileChooser(System.getProperty("user.dir"));
		//Allow only files to be opened
		fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
		fc.setDialogTitle("Choose File to Open");
		//Remove the choosable file types
		fc.removeChoosableFileFilter(fc.getFileFilter());
		//Add only UML file option
		fc.setFileFilter(new FileNameExtensionFilter("UML Files", "uml"));

		if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
			if (fc.getSelectedFile() != null) {
				setModelPath(fc.getSelectedFile().getAbsolutePath());
				getModelFilePathTextField().setForeground(
						new java.awt.Color(0, 0, 0));
				getModelFilePathTextField().setText(modelPath);
			}
		}

	}// GEN-LAST:event_browseModelButtonActionPerformed

	/*
	 * Open a open-file dialog
	 * */
	private void browseConstraintButtonActionPerformed(
			java.awt.event.ActionEvent evt) {// GEN-FIRST:event_browseConstraintButtonActionPerformed
		JFileChooser fc = new JFileChooser(System.getProperty("user.dir"));
		fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
		fc.setDialogTitle("Choose File to Open");
		fc.removeChoosableFileFilter(fc.getFileFilter());
		fc.setFileFilter(new FileNameExtensionFilter("OCL Files", "ocl"));

		if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
			if (fc.getSelectedFile() != null) {
				setConstraintPath(fc.getSelectedFile().getAbsolutePath());
				getConstraintFilePathTextField().setForeground(
						new java.awt.Color(0, 0, 0));
				getConstraintFilePathTextField().setText(constraintPath);
			}
		}
	}// GEN-LAST:event_browseConstraintButtonActionPerformed

	private void browseOutputButtonActionPerformed(
			java.awt.event.ActionEvent evt) {// GEN-FIRST:event_browseOutputButtonActionPerformed
		JFileChooser fc = new JFileChooser(System.getProperty("user.dir"));
		fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
		fc.setDialogTitle("Choose File to Open");
		fc.removeChoosableFileFilter(fc.getFileFilter());
		fc.setFileFilter(new FileNameExtensionFilter("Text Files", "txt"));

		if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
			if (fc.getSelectedFile() != null) {
				setOutputPath(fc.getSelectedFile().getAbsolutePath());
			}
			getOutputFilePathTextField().setText(outputPath);
		}
	}// GEN-LAST:event_browseOutputButtonActionPerformed

	private void generateButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_generateButtonActionPerformed

		if ((getModelPath() != null) && (getConstraintPath() != null)) {
			setModelFile(new File(getModelPath()));
			setConstraintFile(new File(getConstraintPath()));
			setOutputFile(new File(getOutputPath()));
			PrintWriter pw = null;
			Constraint con = null;
			OCLExpressionParser expParser = new OCLExpressionParser(modelFile,
					constraintFile);
			try {
				con = expParser.parse();
				pw = new PrintWriter(new FileWriter(getOutputFile()), true);
				if (con != null)
					pw.println(con.toBreadthFirstString());

				BDDBuilder builder = new BDDBuilder(con);
				builder.apply().toDotGraphOverriden(pw,
						"Final Diagram");
				pw.flush();
				pw.close();
				getMessageLabel().setText("..::Output_Generated::..");
				Desktop desktop = null;
				if (Desktop.isDesktopSupported()) {
					desktop = Desktop.getDesktop();
					desktop.edit(outputFile);
				}
			} catch (InvalidConstraintException e1) {
				e1.printStackTrace();
			} catch (IOException e) {
				System.err.println("Cannot create file writer.");
				e.printStackTrace();
			}

		} else {
			String message = DEFAULT_MESSAGE + " :";
			if (getModelPath() == null) {
				message += MODEL_ERROR + ",";
			}
			if (getConstraintPath() == null) {
				message += CONSTRAINT_ERROR + ".";
			}
			getMessageLabel().setText(message);
		}
	}// GEN-LAST:event_generateButtonActionPerformed

	// Variables declaration - do not modify//GEN-BEGIN:variables
	private javax.swing.JButton browseConstraintButton;
	private javax.swing.JButton browseModelButton;
	private javax.swing.JButton browseOutputButton;
	private javax.swing.JTextField constraintFilePathTextField;
	private javax.swing.JLabel constraintLabel;
	private javax.swing.JLabel constraintPathLabel;
	private javax.swing.JButton generateButton;
	private javax.swing.JLabel jLabel2;
	private javax.swing.JLabel messageLabel;
	private javax.swing.JTextField modelFilePathTextField;
	private javax.swing.JLabel modelLabel;
	private javax.swing.JLabel modelPathLabel;
	private javax.swing.JTextField outputFilePathTextField;
	private javax.swing.JLabel outputPathLabel;
	private javax.swing.JButton resetButton;

	// End of variables declaration//GEN-END:variables

	/**
	 * @return the modelPath
	 */
	public String getModelPath() {
		return modelPath;
	}

	/**
	 * @param modelPath
	 *            the modelPath to set
	 */
	public void setModelPath(String modelPath) {
		this.modelPath = modelPath;
	}

	/**
	 * @return the constraintPath
	 */
	public String getConstraintPath() {
		return constraintPath;
	}

	/**
	 * @param constraintPath
	 *            the constraintPath to set
	 */
	public void setConstraintPath(String constraintPath) {
		this.constraintPath = constraintPath;
	}

	/**
	 * @return the outputPath
	 */
	public String getOutputPath() {
		return outputPath;
	}

	/**
	 * @param outputPath
	 *            the outputPath to set
	 */
	public void setOutputPath(String outputPath) {
		this.outputPath = outputPath;
	}

	/**
	 * @return the browseConstraintButton
	 */
	public javax.swing.JButton getBrowseConstraintButton() {
		return browseConstraintButton;
	}

	/**
	 * @param browseConstraintButton
	 *            the browseConstraintButton to set
	 */
	public void setBrowseConstraintButton(
			javax.swing.JButton browseConstraintButton) {
		this.browseConstraintButton = browseConstraintButton;
	}

	/**
	 * @return the browseModelButton
	 */
	public javax.swing.JButton getBrowseModelButton() {
		return browseModelButton;
	}

	/**
	 * @param browseModelButton
	 *            the browseModelButton to set
	 */
	public void setBrowseModelButton(javax.swing.JButton browseModelButton) {
		this.browseModelButton = browseModelButton;
	}

	/**
	 * @return the browseOutputButton
	 */
	public javax.swing.JButton getBrowseOutputButton() {
		return browseOutputButton;
	}

	/**
	 * @param browseOutputButton
	 *            the browseOutputButton to set
	 */
	public void setBrowseOutputButton(javax.swing.JButton browseOutputButton) {
		this.browseOutputButton = browseOutputButton;
	}

	/**
	 * @return the constraintFilePathTextField
	 */
	public javax.swing.JTextField getConstraintFilePathTextField() {
		return constraintFilePathTextField;
	}

	/**
	 * @param constraintFilePathTextField
	 *            the constraintFilePathTextField to set
	 */
	public void setConstraintFilePathTextField(
			javax.swing.JTextField constraintFilePathTextField) {
		this.constraintFilePathTextField = constraintFilePathTextField;
	}

	/**
	 * @return the constraintLabel
	 */
	public javax.swing.JLabel getConstraintLabel() {
		return constraintLabel;
	}

	/**
	 * @param constraintLabel
	 *            the constraintLabel to set
	 */
	public void setConstraintLabel(javax.swing.JLabel constraintLabel) {
		this.constraintLabel = constraintLabel;
	}

	/**
	 * @return the constraintPathLabel
	 */
	public javax.swing.JLabel getConstraintPathLabel() {
		return constraintPathLabel;
	}

	/**
	 * @param constraintPathLabel
	 *            the constraintPathLabel to set
	 */
	public void setConstraintPathLabel(javax.swing.JLabel constraintPathLabel) {
		this.constraintPathLabel = constraintPathLabel;
	}

	/**
	 * @return the generateButton
	 */
	public javax.swing.JButton getGenerateButton() {
		return generateButton;
	}

	/**
	 * @param generateButton
	 *            the generateButton to set
	 */
	public void setGenerateButton(javax.swing.JButton generateButton) {
		this.generateButton = generateButton;
	}

	/**
	 * @return the jLabel2
	 */
	public javax.swing.JLabel getjLabel2() {
		return jLabel2;
	}

	/**
	 * @param jLabel2
	 *            the jLabel2 to set
	 */
	public void setjLabel2(javax.swing.JLabel jLabel2) {
		this.jLabel2 = jLabel2;
	}

	/**
	 * @return the modelFilePathTextField
	 */
	public javax.swing.JTextField getModelFilePathTextField() {
		return modelFilePathTextField;
	}

	/**
	 * @param modelFilePathTextField
	 *            the modelFilePathTextField to set
	 */
	public void setModelFilePathTextField(
			javax.swing.JTextField modelFilePathTextField) {
		this.modelFilePathTextField = modelFilePathTextField;
	}

	/**
	 * @return the modelLabel
	 */
	public javax.swing.JLabel getModelLabel() {
		return modelLabel;
	}

	/**
	 * @param modelLabel
	 *            the modelLabel to set
	 */
	public void setModelLabel(javax.swing.JLabel modelLabel) {
		this.modelLabel = modelLabel;
	}

	/**
	 * @return the modelPathLabel
	 */
	public javax.swing.JLabel getModelPathLabel() {
		return modelPathLabel;
	}

	/**
	 * @param modelPathLabel
	 *            the modelPathLabel to set
	 */
	public void setModelPathLabel(javax.swing.JLabel modelPathLabel) {
		this.modelPathLabel = modelPathLabel;
	}

	/**
	 * @return the outputFilePathTextField
	 */
	public javax.swing.JTextField getOutputFilePathTextField() {
		return outputFilePathTextField;
	}

	/**
	 * @param outputFilePathTextField
	 *            the outputFilePathTextField to set
	 */
	public void setOutputFilePathTextField(
			javax.swing.JTextField outputFilePathTextField) {
		this.outputFilePathTextField = outputFilePathTextField;
	}

	/**
	 * @return the outputPathLabel
	 */
	public javax.swing.JLabel getOutputPathLabel() {
		return outputPathLabel;
	}

	/**
	 * @param outputPathLabel
	 *            the outputPathLabel to set
	 */
	public void setOutputPathLabel(javax.swing.JLabel outputPathLabel) {
		this.outputPathLabel = outputPathLabel;
	}

	/**
	 * @return the resetButton
	 */
	public javax.swing.JButton getResetButton() {
		return resetButton;
	}

	/**
	 * @param resetButton
	 *            the resetButton to set
	 */
	public void setResetButton(javax.swing.JButton resetButton) {
		this.resetButton = resetButton;
	}

	/**
	 * @return the messageLabel
	 */
	public javax.swing.JLabel getMessageLabel() {
		return messageLabel;
	}

	/**
	 * @param messageLabel
	 *            the messageLabel to set
	 */
	public void setMessageLabel(javax.swing.JLabel messageLabel) {
		this.messageLabel = messageLabel;
	}

	public static void setModelFile(File modelFile) {
		MainGUI.modelFile = modelFile;
	}

	public static File getModelFile() {
		return modelFile;
	}

	public static void setConstraintFile(File constraintFile) {
		MainGUI.constraintFile = constraintFile;
	}

	public static File getConstraintFile() {
		return constraintFile;
	}

	public static void setOutputFile(File outputFile) {
		MainGUI.outputFile = outputFile;
	}

	public static File getOutputFile() {
		return outputFile;
	}

	public static void setDEFAULT_OUTPUT_PATH(String dEFAULT_OUTPUT_PATH) {
		DEFAULT_OUTPUT_PATH = dEFAULT_OUTPUT_PATH;
	}

	public static String getDEFAULT_OUTPUT_PATH() {
		return DEFAULT_OUTPUT_PATH;
	}
}
